var e = require("../../common/vendor.js"), r = require("../../api/ajax.js");

require("../../api/service.js"), require("../../utils/luch-request/core/Request.js"), 
require("../../utils/luch-request/core/dispatchRequest.js"), require("../../utils/luch-request/adapters/index.js"), 
require("../../utils/luch-request/helpers/buildURL.js"), require("../../utils/luch-request/utils.js"), 
require("../../utils/luch-request/core/buildFullPath.js"), require("../../utils/luch-request/helpers/isAbsoluteURL.js"), 
require("../../utils/luch-request/helpers/combineURLs.js"), require("../../utils/luch-request/core/settle.js"), 
require("../../utils/luch-request/core/InterceptorManager.js"), require("../../utils/luch-request/core/mergeConfig.js"), 
require("../../utils/luch-request/core/defaults.js"), require("../../utils/luch-request/utils/clone.js"), 
require("../../uni_modules/u-store/js_sdk/Storage.js"), require("../../config/config.js");

var t = {
    data: function() {
        return {
            form: {
                keywords: ""
            },
            rules: {
                keywords: [ {
                    required: !0,
                    message: "此为必填字段",
                    trigger: [ "blur", "change" ]
                }, {
                    validator: function(e, r, t) {
                        return !0;
                    },
                    message: "输入内容格式错误",
                    trigger: [ "blur" ]
                } ]
            }
        };
    },
    onReady: function() {
        this.$refs.form.setRules(this.rules);
    },
    computed: {
        customStyle: function() {
            return {
                form: {},
                height: "80rpx",
                background: "#000000",
                color: "#fff",
                fontSize: "26rpx",
                borderRadius: "40rpx"
            };
        }
    },
    onLoad: function() {},
    methods: {
        submit: function() {
            var t = this;
            this.$refs.form.validate().then(function(u) {
                r.doGetUrl("https://che.fuliaoxx.com/api/index/postSerach", {
                    phone: t.form.keywords
                }).then(function(r) {
                    var u = r.data;
                    1 == u.data.length ? e.index.navigateTo({
                        url: "/pages/quality/quality?keywords=" + t.form.keywords+'&id='+u.data[0].id
                    }) : u.data.length >= 2 ? e.index.navigateTo({
                        url: "/pages/quality/lists?keywords=" + t.form.keywords
                    }) : t.$refs.modal.open();
                });
            }).catch(function(r) {
                e.index.showToast({
                    icon: "error",
                    title: "校验失败"
                });
            });
        },
        goPage: function(r) {
            e.index.navigateTo({
                url: "/pages/" + r
            });
        },
        change: function(e) {
            this.value = e;
        }
    }
};

Array || (e.resolveComponent("uv-image") + e.resolveComponent("uv-text") + e.resolveComponent("uv-input") + e.resolveComponent("uv-form-item") + e.resolveComponent("uv-form") + e.resolveComponent("uv-gap") + e.resolveComponent("uv-button") + e.resolveComponent("uv-modal"))(), 
Math || (function() {
    return "../../uni_modules/uv-image/components/uv-image/uv-image.js";
} + function() {
    return "../../uni_modules/uv-text/components/uv-text/uv-text.js";
} + function() {
    return "../../uni_modules/uv-input/components/uv-input/uv-input.js";
} + function() {
    return "../../uni_modules/uv-form/components/uv-form-item/uv-form-item.js";
} + function() {
    return "../../uni_modules/uv-form/components/uv-form/uv-form.js";
} + function() {
    return "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
} + function() {
    return "../../uni_modules/uv-button/components/uv-button/uv-button.js";
} + function() {
    return "../../uni_modules/uv-modal/components/uv-modal/uv-modal.js";
})();

var u = e._export_sfc(t, [ [ "render", function(r, t, u, o, n, s) {
    return {
        a: e.p({
            src: "/static/ucenter/banner.jpg",
            width: "750rpx",
            mode: "widthFix"
        }),
        b: e.p({
            text: "质保查询"
        }),
        c: e.o(function(e) {
            return n.form.keywords = e;
        }),
        d: e.p({
            searchIconColor: "#333333",
            inputAlign: "center",
            color: "#000000",
            placeholderColor: "#333333",
            placeholderStyle: "#333333",
            placeholder: "请输入电话号码/车牌号/车架号",
            modelValue: n.form.keywords
        }),
        e: e.p({
            label: "",
            prop: "keywords"
        }),
        f: e.sr("form", "2c323f2c-2"),
        g: e.p({
            model: n.form,
            rules: n.rules
        }),
        h: e.p({
            height: "10",
            bgColor: "#000000"
        }),
        i: e.o(s.submit),
        j: e.p({
            color: "linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
        }),
        k: e.p({
            height: "40",
            bgColor: "#000000"
        }),
        l: e.p({
            src: "/static/image/bottom2.png",
            width: "750rpx",
            mode: "widthFix"
        }),
        m: e.p({
            height: "30"
        }),
        n: e.o(function(e) {
            return s.goPage("ucenter/home/home");
        }),
        o: e.p({
            text: "质保录入",
            size: "large",
            color: "linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
        }),
        p: e.p({
            height: "30"
        }),
        q: e.sr("modal", "2c323f2c-12"),
        r: e.p({
            title: "没有查询到数据!",
            content: "请再次确认您的查询信息是否有误。请使用手机号，车牌号查询，如有任何疑问请及时联系我们。"
        })
    };
} ] ]);

wx.createPage(u);